import request from '@/utils/request';
// 获取会员管理列表
const GetUserUserListApi = '/businessCore/faUser/list';
// 获取会员相册列表
const GetUserAlbumListApi = '/businessCore/faUserAlbum/list';
// 获取信息评分列表
const GetUserScoresListApi = '/businessCore/faUserScores/list';
// 获取积分变动列表
const GetUserScoreListApi = '/businessCore/faUserScoreLog/list';
// 获取会员订单列表
const GetUserOrderListApi = '/businessCore/faorder/list';

// 会员认证管理
const GetUserRealNameListApi = '/businessCore/faUserAuthenticationRealName/list';
const GetUserEducationListApi = '/businessCore/faUserAuthenticationEdu/list';
const GetUserSalaryListApi = '/businessCore/faUserAuthenticationSalary/list';
const GetUserCarListApi = '/businessCore/faUserAuthenticationCar/list';
const GetUserHouseListApi = '/businessCore/faUserAuthenticationHouse/list';
const GetUserMarriageListApi = '/businessCore/faUserAuthenticationMarriage/list';

// 获取题型管理列表
const GetQuestionTypeListApi = '/businessCore/faQuestionType/list';
// 获取主题管理列表
const GetQuestionThemeListApi = '/businessCore/faQuestionTheme/list';
// 获取题库标签列表
const GetQuestionLabelListApi = '/businessCore/faQuestionLabel/list';
// 获取题库分类列表
const GetQuestionCategoryListApi = '/businessCore/faQuestionCategory/list';

// AB题
const GetAbQuestListApi = '/businessCore/faAbQuestions/list';
// 必答题
const GetBdQuestListApi = '/businessCore/faMustAnswerQuestions/list';
// 共同题
const GetGtQuestListApi = '/businessCore/faCommonQuestions/list';
// 简答题
const GetJdQuestListApi = '/businessCore/faShortAnswerQuestions/list';
// 矛盾题
const GetMdQuestListApi = '/businessCore/faContradictionQuestions/list';
// 三观不正题
const GetSgbzQuestListApi = '/businessCore/faThreeOutlooksQuestions/list';
// 优先答题
const GetYxdQuestListApi = '/businessCore/faFirstQuestions/list';
// 组合题
const GetZhQuestListApi = '/businessCore/faCombinationQuestions/list';
// 组合组别
const GetZhQuestGroupListApi = '/businessCore/faCombinationQuestionsGroup/list';

// 获取匹配管理列表
const GetMatchManagementListApi = '/businessCore/faMatch/list';

// 获取见面请求管理列表
const GetMeetRequestListApi = '/businessCore/faUserRequestMeet/list';
// 获取约会管理列表
const GetAppointmentListApi = '/businessCore/faUserMeet/list';
// 获取后台管理人员列表
const GetAdminListApi = '/businessCore/faUserMeet/getSysUserList';

// 获取认证信任度套餐
const GetMarketTrustListApi = '/businessCore/faTrustPlan/list';
// 获取优惠券管理
const GetMarketCouponListApi = '/businessCore/faCoupon/list';
// 获取积分充值套餐
const GetMarketPointListApi = '/businessCore/faPointsPlan/list';
// 获取见面充值套餐
const GetMarketMeetListApi = '/businessCore/faMeetPlan/list';

// 获取血型设置列表
const GetBloodTypeListApi = '/businessCore/faBasicBloodtype/list';
// 获取企业性质设置列表
const GetCompanyNatureListApi = '/businessCore/faBasicCompanyNature/list';
// 获取星座设置列表
const GetConstellationListApi = '/businessCore/faBasicConstellation/list';
// 获取学历设置列表
const GetEduListApi = '/businessCore/faBasicEdu/list';
// 获取院校性质设置列表
const GetEduTypeListApi = '/businessCore/faBasicEduType/list';
// 获取职业设置列表
const GetJobListApi = '/businessCore/faBasicJob/list';
// 获取民族设置列表
const GetNationListApi = '/businessCore/faBasicNation/list';
// 获取年薪设置列表
const GetSalaryListApi = '/businessCore/faBasicSalary/list';
// 获取属相设置列表
const GetZodiacListApi = '/businessCore/faBasicZodiac/list';

// 获取会员关注列表
const GetUserAttentionListApi = '/businessCore/faUserAttention/list';
// 获取会员收藏列表
const GetUserCollectListApi = '/businessCore/faUserCollect/list';
// 获取会员喜欢列表
const GetUserLikeListApi = '/businessCore/faUserLike/list';
// 获取会员浏览列表
const GetUserLookListApi = '/businessCore/faUserLook/list';

// 获取会员必答题列表
const GetUserBdtListApi = '/businessCore/faUserMustAnswer/list';
// 获取会员普通题列表
const GetUserPttListApi = '/businessCore/faUserOrdinaryAnswer/list';

// 获取扣分标签列表
const GetLabelSubtrListApi = '/businessCore/faLabelSubtract/list';
// 获取得分标签列表
const GetLabelAddListApi = '/businessCore/faLabelAdd/list';
// 获取得分标签配置列表
const GetLabelAddOptionApi = '/businessCore/labelAddConfig/getAllLabelAddList';

// 查询地区数据下拉
const GetAreaListApi = '/businessCore/common/getAllAreaList';
// 查询血型数据下拉
const GetBloodTypeApi = '/businessCore/common/getAllBloodTypeList';
// 查询星座数据下拉
const GetConstellationApi = '/businessCore/common/getAllConstellationList';
// 查询学历数据下拉
const GetEduApi = '/businessCore/common/getAllEduList';
// 查询院校性质数据下拉
const GetEduTypeApi = '/businessCore/common/getAllEduTypeList';
// 查询民族数据下拉
const GetNationApi = '/businessCore/common/getAllNationList';
// 查询年薪数据下拉
const GetSalaryApi = '/businessCore/common/getAllSalaryList';
// 查询生肖数据下拉
const GetZodiacApi = '/businessCore/common/getAllZodiacList';
// 查询企业性质设置数据下拉
const GetBusinessNatureApi = '/businessCore/common/getAllCompanyNatureList';
// 查询职业设置数据下拉
const GetJobApi = '/businessCore/common/getAllJobList';
// 查询用户Id下拉
const GetUserIdApi = '/businessCore/faUserAlbum/getAllUserList';
// 查询二级标签数据下拉
const GetAllTwoLabelApi = '/businessCore/common/getAllTwoLabelData';
// 查询各级标签数据下拉
const GetAllLabelApi = '/businessCore/labelAddConfig/getLabelAddListByLevel';

// 获取所有题型下拉
const GetAllQuestionnaireApi = '/businessCore/common/getAllQuestionTypeManagementList';
// 获取所有题库分类下拉
const GetQuestionnaireTypeApi = '/businessCore/common/getAllQuestionCategoryList';
// 获取所有题库主题下拉
const GetQuestionnaireThemeApi = '/businessCore/common/getAllQuestionThemeList';
// 获取所有题库标签下拉
const GetQuestionnaireTabApi = '/businessCore/common/getAllQuestionsLabelList';
// 所有必答题下拉
const GetAnswerQuestApi = '/businessCore/faCommonQuestions/getAllMustAnswerQuestion';

/**
 * @description 表格数据通用接口集
 * @author fengjunjie
 */
export function getTableListAction({ apiKey, params, method = 'get' }) {
  const exportObj = {
    // 获取会员管理列表
    userUserList: GetUserUserListApi,
    // 获取会员相册列表
    userAlbumList: GetUserAlbumListApi,
    // 获取信息评分列表
    userScoresList: GetUserScoresListApi,
    // 获取积分变动列表
    userScoreList: GetUserScoreListApi,
    // 获取积分变动列表
    userOrderList: GetUserOrderListApi,

    // 会员认证管理
    userRealNameList: GetUserRealNameListApi,
    userEducationList: GetUserEducationListApi,
    userSalaryList: GetUserSalaryListApi,
    userCarList: GetUserCarListApi,
    userHouseList: GetUserHouseListApi,
    userMarriageList: GetUserMarriageListApi,

    // 获取会员关注列表
    userAttentionList: GetUserAttentionListApi,
    // 获取会员收藏列表
    userCollectList: GetUserCollectListApi,
    // 获取会员喜欢列表
    userLikeList: GetUserLikeListApi,
    // 获取会员浏览列表
    userLookList: GetUserLookListApi,

    // 获取会员必答题列表
    userBdtList: GetUserBdtListApi,
    // 获取会员普通题列表
    userPttList: GetUserPttListApi,

    // 获取题型管理列表
    questionTypeList: GetQuestionTypeListApi,
    // 获取主题管理列表
    questionThemeList: GetQuestionThemeListApi,
    // 题库标签列表
    questionLabelList: GetQuestionLabelListApi,
    // 题库分类列表
    questionCategoryList: GetQuestionCategoryListApi,

    // AB题列表
    AbQuestList: GetAbQuestListApi,
    // 必答题列表
    BdQuestList: GetBdQuestListApi,
    // 共同题列表
    GtQuestList: GetGtQuestListApi,
    // 简答题列表
    JdQuestList: GetJdQuestListApi,
    // 矛盾题列表
    MdQuestList: GetMdQuestListApi,
    // 三观不正题列表
    SgbzQuestList: GetSgbzQuestListApi,
    // 优先答题列表
    YxdQuestList: GetYxdQuestListApi,
    // 组合题列表
    ZhQuestList: GetZhQuestListApi,
    // 组合组别列表
    ZhQuestGroupList: GetZhQuestGroupListApi,

    // 见面请求管理列表
    meetRequestList: GetMeetRequestListApi,
    // 约会管理列表
    appointmentList: GetAppointmentListApi,
    // 后台管理人员列表
    adminList: GetAdminListApi,

    // 匹配管理列表
    matchManagementList: GetMatchManagementListApi,

    // 获取认证信任度套餐列表
    marketTrustList: GetMarketTrustListApi,
    // 获取优惠券管理列表
    marketCouponList: GetMarketCouponListApi,
    // 获取积分充值套餐列表
    marketPointList: GetMarketPointListApi,
    // 获取见面充值套餐列表
    marketMeetList: GetMarketMeetListApi,

    // 血型设置列表
    basicBloodTypeList: GetBloodTypeListApi,
    // 企业性质设置列表
    basicCompanyNatureList: GetCompanyNatureListApi,
    // 星座设置列表
    basicConstellationList: GetConstellationListApi,
    // 学历设置列表
    basicEduList: GetEduListApi,
    // 院校性质设置列表
    basicEduTypeList: GetEduTypeListApi,
    // 职业设置列表
    basicJobList: GetJobListApi,
    // 民族设置列表
    basicNationList: GetNationListApi,
    // 年薪设置列表
    basicSalaryList: GetSalaryListApi,
    // 属相设置列表
    basicZodiacList: GetZodiacListApi,

    // 扣分标签列表
    labelSubtrList: GetLabelSubtrListApi,
    // 得分标签列表
    labelAddList: GetLabelAddListApi,
    // 得分标签配置列表
    labelAddOptionList: GetLabelAddOptionApi,
  };
  return request({ url: exportObj[apiKey], method, params });
}

//   /**
//    * @description 下拉字段通用接口集
//    * @author fengjunjie
//    */
import isPlainObject from 'lodash/isPlainObject';
export function getOptionDynamicList({ apiKey, params, method = 'get' }) {
  const optionObj = {
    AreaListOption: GetAreaListApi,
    BloodTypeOption: GetBloodTypeApi,
    ConstellationOption: GetConstellationApi,
    EduOption: GetEduApi,
    EduTypeOption: GetEduTypeApi,
    NationOption: GetNationApi,
    SalaryOption: GetSalaryApi,
    ZodiacOption: GetZodiacApi,
    JobOption: GetJobApi,
    BusinessNatureOption: GetBusinessNatureApi,
    UserIdOption: GetUserIdApi,
    AllTwoLabelOption: GetAllTwoLabelApi,
    AllLabelList: GetAllLabelApi,

    questionAllQuestOption: GetAllQuestionnaireApi,
    questionQuestTypeOption: GetQuestionnaireTypeApi,
    questionQuestThemeOption: GetQuestionnaireThemeApi,
    questionQuestTabOption: GetQuestionnaireTabApi,
    questionAnswerQuestOption: GetAnswerQuestApi,
    questionLabelOption: GetQuestionLabelListApi,
  };
  return request({ url: optionObj[apiKey] + (!isPlainObject(params) ? '/' + params : ''), method, params: isPlainObject(params) ? params : {} });
}
